<h1><?php echo $this->translate('news_list');?></h1>
<table class="admin-table" cellpadding="0" cellspacing="0">
    <tr class="title">
        <th><?php echo $this->translate('title');?></th>
        <th><?php echo $this->translate('sysname');?></th>
        <th><?php echo $this->translate('publish_date');?></th>
        <th colspan="2">&nbsp;</th>
    </tr>
    <?php
    /** @var News_Model_Mapper_News $item */
    foreach($this->list as $k => $item):?>
    <tr class="row<?php echo ($k%2 == 1) ? '2' : '';?>">
        <td><?php echo $this->link( $item->title,$this->url(array('module'=>'news','action'=>'edit','id'=>$item->id),'admin',true) );?></td>
        <td><?php echo $item->sysname;?></td>
        <td><?php echo $this->link($this->url(array('newsname'=>$item->sysname),'news',true),$this->url(array('newsname'=>$item->sysname),'news',true),array('target'=>'newsview'));?></td>
        <td><?php echo $item->publish_date;?></td>
        <td>
            <?php echo $this->link( 'edit' ,$this->url(array('module'=>'news','action'=>'edit','id'=>$item->id),'admin',true) );?>
            <?php echo ($item->built_in == false && ($item->user_id == $this->identity->id || $this->identity->Role->name == 'admin')) ?
                $this->link( 'delete' ,$this->url(array('module'=>'news','action'=>'delete','id'=>$item->id),'admin',true),null,'Are you sure?' ) : '' ;?>
        </td>
    </tr>
    <?php endforeach;?>
</table>